package com.daylightrobbery.server.packet.login;

import com.daylightrobbery.server.packet.type.DataPacket;
import org.springframework.stereotype.Component;

@Component
public class IdleReqPacket implements DataPacket {

    public int type = 10003;

    public String uid;
    public long reqTime;

    public String getUid() {
        return uid;
    }

    public IdleReqPacket setUid(String uid) {
        this.uid = uid;
        return this;
    }

    public long getReqTime() {
        return reqTime;
    }

    public IdleReqPacket setReqTime(long reqTime) {
        this.reqTime = reqTime;
        return this;
    }

    @Override
    public DataPacket process() {
        return new IdleRespPacket()
                .setUid(uid)
                .setReqTime(reqTime);
    }

    @Override
    public int getType() {
        return type;
    }

    @Override
    public String toString() {
        return "IdleReqPacket{" +
                "type=" + type +
                ", uid='" + uid + '\'' +
                ", reqTime=" + reqTime +
                '}';
    }
}
